package com.jzy.gulimall.authserver;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 *
 * RedisHttpSessionConfiguration ->
 * RedisIndexedSessionRepository: 初始化各种配置,session增删改查的类,生成sessionRepository(RedisSerializer)放到spring容器中
 * 继承SpringHttpSessionConfiguration:各种配置,包含一个过滤器springSessionRepositoryFilter(注入sessionRepository,cookieSerializer)
 *  springSessionRepositoryFilter过滤器    装饰者模式 request,response进行包装
 *  原生request.getAttr->wrappedRequest.getAttr
 *      重写所有方法->redis
 *
 *  session自动延期
 *
 */
@EnableRedisHttpSession
@SpringBootApplication
@EnableFeignClients(basePackages = "com.jzy.gulimall.authserver.feign")
public class GulimallAuthServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallAuthServerApplication.class, args);
    }

}
